package com.itheima.controller;


import com.itheima.common.PageBean;
import com.itheima.common.R;
import com.itheima.dto.LogDto;


import com.itheima.service.LogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin (value = "*", methods = {RequestMethod.GET, RequestMethod.POST, RequestMethod.PUT, RequestMethod.DELETE})
@RestController
@Slf4j
public class ReportController {
    @Autowired
    private LogService logService;

    /**
     * 用于分页查询日志信息
     *
     * @return Result
     */

    @GetMapping ("/logs/pageQuery")
    public R list(LogDto logDto) {
        PageBean pageBean = logService.list(logDto);
        return R.ok(pageBean);
    }
}
